Printer, information processing apparatus, and control method of interface

ABSTRACT

When it is detected that a USB cable has been connected, a status of a function is discriminated. If there is no problem even if a USB enumeration is started, a USB signal is pulled up and the enumeration is started. If it is determined that trouble occurs as a function when the enumeration is started, the pull-up of the USB signal is extended and, after the trouble is solved, the USB signal is pulled up and the enumeration is started.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The invention relates to a printer having a USB interface and at least an interface other than the USB interface.

[0003] 2. Related Background Art

[0004] The Universal Serial Bus (USB) interface which has formally been supported since Windows (registered trademark) 98 is a new interface which is substituted for conventional IEEE1284. The USB interface has the following features.

[0005] 1) Devices having various functions can be connected.

[0006] (IEEE1284 is originally an interface only for use for printers.)

[0007] 2) “Plug & Play” is possible.

[0008] 3) Up to 127 apparatuses can be connected via a hub.

[0009] And the like.

[0010] To realize “Plug & Play”, in the USB, the device has a bus termination as shown in FIG. 3.

[0011] In FIG. 3, reference numeral 300 denotes a host side and 301 indicates a function. The termination on the host 300 side has been pulled down and one of signals on the function 301 side has been pulled up. In the case of the USB fast speed function, D+ has been pulled up. In the case of the USB slow speed function, D− has been pulled up. (Note: In the USB, there are two transfer speeds of 12 Mbits and 1.5 Mbits. The function for performing the 12-Mbit transfer is called a fast speed function and the function for performing the 1.5-Mbit transfer is called a slow speed function. In the USB, the host and hub have to be able to support both of the fast speed transfer and the slow speed transfer.) Therefore, if the host 300 and the function 301 are connected by a USB cable and a power source of the function 301 is turned on, since the signal D+ or D− is pulled up, one of the signal D+ and D− on the host side is set to the high level. The host 300 detects that D+ or D− of the USB data signal has been set to the high level, thereby recognizing that the USB function has physically been connected. When the host 300 confirms that the function 301 has been connected, the host issues a command to confirm what the connected function is. When the function 301 receives the command from the host 300, the function 301 returns information of a device class or a device model name or the information of the device class and the device model name to the host 300. For example, if the function 301 is a printer, the host recognizes that the function 301 belongs to the class of the printer from the received information of the device class or the received information of the device model name and issues a command of the printer class.

[0012] If the function 301 belongs to the class of a pointing device (human interface device), the host recognizes that the function 301 is the class of the pointing device (human interface device) from the received information of the device class or the received information of the device model name and issues a command of the class of the pointing device (human interface device).

[0013] Such a process for confirming what the connected function is is called enumeration.

[0014] Although the USB has formally been supported in Windows (registered trademark) 98, there are many apparatuses which support only conventional IEEE1284 such as personal computers before the release of Windows (registered trademark) 98, apparatuses other than the personal computers, and the like. Therefore, if the printer supports both of the USB and IEEE1284 until the USB is widely spread, it benefits the user. FIG. 4 shows a constructional diagram of a printer having both of the USB and IEEE1284. In FIG. 4, in the case of printing via IEEE1284, print data and a print command which are sent from an upper apparatus are stored from an IEEE1284 cable 115 into a buffer 113 via an IEEE1284 I/F 106, a USB/IEEE selector 107, and a buffer controller 108. A CPU 101 interprets and modifies the print command and print data stored in the buffer 113 and controls in accordance with the print command in a manner such that a motor controller 110 controls a CRMotor/LFMotor (not shown) via a motor driver 112 and a print head controller 109 controls a print head 111 to output the print data. While printing, the CPU is heavily loaded with interpretation and modification of the print command and print data sent from the upper apparatus, motor control, and print head control. When the USB cable is connected and the foregoing enumeration is started during the printing, the CPU is burdened with the enumeration, so that there is a possibility of occurrence of

[0015] 1) decrease in printing speed

[0016] 2) impossibility of enumeration

[0017] Particularly, in the case of a printer of a low price, a cheap CPU whose processing ability is low is often used, so that such a possibility increases.

SUMMARY OF THE INVENTION

[0018] According to the invention, means for pulling up one of two signal lines of the USB or disconnecting the pull-up is used, when a USB cable is connected or a power source of a host is turned on during printing by IEEE1284, the USB signal line is not pulled up until the end of the printing by IEEE1284, it is pulled up after completion of the printing, and the USB enumeration is executed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0019]FIG. 1 is a block diagram showing an embodiment of the invention;

[0020]FIG. 2 is a constructional diagram showing USB pull-up control;

[0021]FIG. 3 is a constructional diagram showing a USB termination; and

[0022]FIG. 4 is a block diagram showing a conventional example.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0023]FIG. 1 is a block diagram showing an embodiment of the invention.

[0024] In FIG. 1, reference numeral 1 denotes a CPU; 2 a ROM; 3 a print controller; 4 a CPU I/F; 5 a USB I/F; 6 an IEEE1284 I/F; 7 a selector for switching the USB and IEEE1284; 8 a buffer controller; 9 a print head controller; 10 a motor controller; 11 a print head; 12 a motor driver; 13 a buffer; 14 a USB cable; 15 an IEEE1284 cable; 16 a USB pull-up controller; 17 a control signal; and 18 a USB cable detection signal. FIG. 2 is a constructional diagram showing a USB pull-up control block. In FIG. 2, reference numeral 21 denotes a high side switch; 22 a pull-up resistor; and 23 and 24 resistors for detecting and dividing a voltage from a host.

[0025] The embodiment will now be described with reference to FIGS. 1 and 2.

[0026] Upon printing on the basis of data sent from IEEE1284, the print data passes through the IEEE1284 cable 15, IEEE1284 I/F 6, and selector 7 and is temporarily stored into the buffer 13 via the buffer controller 8. The CPU 1 modifies the data stored in the buffer and controls in a manner such that the print head controller 9 outputs the print data from the print head 11 and prints it onto a print medium. During the printing, the CPU 1 controls-a series of print data and controls a CR/LF motor (not shown) via the motor controller 10 and the motor driver 12.

[0027] When the host and the printer are connected via the USB I/F cable and a voltage of +5V is supplied from the host, the voltage from the host is divided by the voltage dividing resistors 23 and 24 and supplied to the CPU 1 via the USB cable detection signal 18. At this point of time, the CPU 1 can recognize that the USB cable has been connected and the host is active. The CPU 1 discriminates whether the printer upon the recognition is in a status of “under printing by IEEE1284”. If it is determined as a result of the discrimination that the printer status is not “under printing by IEEE1284”, the CPU 1 turns on the high side switch 21 via the control signal 17. When the high side switch 21 is turned on, since the D+ signal of the USB is pulled up, the host recognizes that the printer is in a communication possible status and starts the USB enumeration. On the contrary, if the discrimination result of the CPU 1 indicates that the printer status is “under printing by IEEE1284”, the CPU 1 does not turn on the high side switch 21 but continues the printing from IEEE1284. When the printing is finished, the CPU 1 turns on the high side switch 21 and starts the USB enumeration.

[0028] As described above, when the USB I/F is activated, by pulling up the USB signal in accordance with the printer status, the enumeration under printing by IEEE1284 can be avoided.

[0029] Although the embodiment has been described mainly with respect to the printer, naturally, the functions mentioned in the embodiment can be also applied to information apparatuses other than the printer. 

What is claimed is:
 1. A printer comprising: a discriminating unit for discriminating whether printing is being executed by using a first interface; and a control unit for, if it is determined by said discriminating unit that the printing is being executed by using the first interface, controlling a second interface so as to recognize that a host is in a communication impossible status in spite of a fact that said second interface has physically been connected to the host.
 2. A printer according to claim 1, wherein if it is determined by said discriminating unit that the printing is not being executed by using the first interface, when said second interface is physically connected to the host, said control unit controls the second interface so as to recognize that the host is in a communication possible status.
 3. A printer according to claim 2, wherein said control unit controls the second interface so as to recognize that the host is in the communication possible status by pulling up a signal.
 4. An information processing apparatus comprising: a discriminating unit for discriminating whether data is being received by using a first interface; and a control unit for, if it is determined by said discriminating unit that the data is being received by using the first interface, controlling a second interface so as to recognize that a host is in a communication impossible status in spite of a fact that said second interface has physically been connected to the host.
 5. An apparatus according to claim 4, wherein if it is determined by said discriminating unit that the data is not being received by using the first interface, when said second interface is physically connected to the host, said control unit controls the second interface so as to recognize that the host is in a communication possible status.
 6. An apparatus according to claim 5, wherein said control unit controls the second interface so as to recognize that the host is in the communication possible status by pulling up a signal.
 7. A control method of an interface, comprising: a discriminating step of discriminating whether printing is being executed by using a first interface; and a control step of, if it is determined by said discriminating step that the printing is being executed by using the first interface, controlling a second interface so as to recognize that a host is in a communication impossible status in spite of a fact that said second interface has physically been connected to the host.
 8. A method according to claim 7, wherein if it is determined by said discriminating step that the printing is not being executed by using the first interface, when said second interface is physically connected to the host, said control step controls the second interface so as to recognize that the host is in a communication possible status.
 9. A method according to claim 8, wherein said control step controls the second interface so as to recognize that the host is in the communication possible status by pulling up a signal.
 10. A control method of an interface, comprising: a discriminating step of discriminating whether data is being received by using a first interface; and a control step of, if it is determined by said discriminating step that the data is being received by using the first interface, controlling a second interface so as to recognize that a host is in a communication impossible status in spite of a fact that said second interface has physically been connected to the host.
 11. A method according to claim 10, wherein if it is determined by said discriminating step that the data is not being received by using the first interface, when said second interface is physically connected to the host, said control step controls the second interface so as to recognize that the host is in a communication possible status.
 12. A method according to claim 11, wherein said control step controls the second interface so as to recognize that the host is in the communication possible status by pulling up a signal.
 13. A printer comprising: a USB interface; means for pulling up one of two signal lines of said USB or disconnecting said pull-up; and a first interface other than at least said USB, wherein when a USB cable is connected to a connector of said USB interface during printing via said first interface, the signal line is not pulled up but after completion of the printing, said pull-up is executed.
 14. An information processing apparatus comprising: a USB; a USB pull-up function for arbitrarily pulling up a USB signal; and a USB detecting function for detecting that said apparatus has been connected to another apparatus via the USB, wherein when it is detected by said USB detecting function that said apparatus has been connected to said another apparatus via the USB, the USB signal is pulled up by using said USB pull-up function in accordance with a situation. 